home *** CD-ROM | disk | FTP | other *** search
-
- while(not_finished){
-
- show_menu();
-
- get_integer(&response);
-
- switch (response){
-
- case 1:/* display image header */
- get_image_name(name);
- read_tiff_header(name, &image_header);
- printf("\n\nCIPS> The image header is:");
- printf("\n\t\twidth=%ld length=%ld start=%ld bits=%ld",
- image_header.image_width,
- image_header.image_length,
- image_header.strip_offset,
- image_header.bits_per_pixel);
- printf("\nCIPS> Hit Enter to continue");
- read_string(rep);
- break;
-
- case 2:/* display image numbers */
- get_image_name(name);
- get_parameters(&il, &ie, &ll, &le);
- read_tiff_image(name, the_image, il, ie, ll, le);
- show_image(the_image, il, ie);
- break;
-
- case 3: /* print image numbers */
- get_image_name(name);
- get_parameters(&il, &ie, &ll, &le);
- read_tiff_image(name, the_image, il, ie, ll, le);
- print_image(the_image, name, 1, 1, 1, 100, 18,
- il, ie);
- break;
-
- case 4: /* display image */
- get_image_name(name);
- read_tiff_header(name, &image_header);
- get_parameters(&il, &ie, &ll, &le);
- display_menu_for_display_image(&image_colors,
- &display_colors, &invert,
- color_transform, monitor_type);
- display_image(name, the_image, il, ie,
- ll, le, &image_header, monitor_type,
- color_transform, invert,
- image_colors, display_colors);
- break;
-
- case 5: /* display image using halftoning */
- get_image_name(name);
- read_tiff_header(name, &image_header);
- get_parameters(&il, &ie, &ll, &le);
- display_menu_for_display_image(&image_colors,
- &display_colors, &invert,
- color_transform, monitor_type);
- get_threshold_value(&threshold, &print);
- display_using_halftoning(the_image, name,
- il, ie, ll, le, threshold,
- invert, image_colors, &image_header,
- monitor_type, print);
- break;
-
- case 6: /* print graphics image */
- get_image_name(name);
- read_tiff_header(name, &image_header);
- get_parameters(&il, &ie, &ll, &le);
- display_menu_for_display_image(&image_colors,
- &display_colors, &invert,
- color_transform, monitor_type);
- get_graphics_caption(caption);
- print_graphics_image(the_image, out_image, name,
- il, ie, ll, le, image_colors,
- invert, caption);
- break;
-
- case 20: /* exit system */
- not_finished = 0;
- break;
-
- default:
- printf("\nCould not understand response, try again");
- break;
-
- } /* ends switch response */
- } /* ends while not finished */